package com.quick.controller;

import com.quick.shop.doamin.dto.ShopDTO;
import com.quick.shop.doamin.vo.ShopVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.quick.shop.doamin.po.Shop;
import com.quick.shop.doamin.search.ShopSearch;
import com.quick.base.Page;
import com.quick.base.Search;
import com.quick.service.IShopService;

@RestController
@RequestMapping("api/shop")
@Api(tags = "店铺管理")
public class ShopController {
	
	@Autowired
	private IShopService shopService;
	
	@PostMapping("search")
	@ApiOperation("店铺分页查询")
	public  Page<Shop> search(@RequestBody Search<ShopSearch> search){
		return shopService.search(search);
	}

	@PostMapping("queryById")
	@ApiOperation("店铺详情")
	public ShopVo queryById(@RequestBody ShopDTO shop){
		return  shopService.queryById(shop);
	}

}
